//
//  WalletHeaderCell.m
//  KuWeiPark
//
//  Created by Kevin Su on 15/5/25.
//  Copyright (c) 2015年 Clief. All rights reserved.
//

#import "WalletHeaderCell.h"
#import "AppMacro.h"

@implementation WalletHeaderCell

- (void)awakeFromNib {
    // Initialization code
    self.topupButton.layer.masksToBounds = YES;
    self.topupButton.layer.cornerRadius = 5;
    
}

- (void)initDataWithRemainAmount:(NSString *)amount{
    
    NSMutableAttributedString *amountAttrStr = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@元", amount]];
    [amountAttrStr addAttribute:NSForegroundColorAttributeName value:RGBACOLOR(102, 102, 102, 1) range:NSMakeRange(amount.length, 1)];
    [amountAttrStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:18] range:NSMakeRange(amount.length, 1)];
    self.remianAmountLabel.attributedText = amountAttrStr;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

- (IBAction)topupAction:(id)sender {
    
    //充值
    if(self.delegate && [self.delegate respondsToSelector:@selector(showTopUpView)]){
        
        [self.delegate showTopUpView];
    }
}


@end
